//Created by wangshuyi on 07/03/2018.

'use strict';
import {imagePath,apiPath,domainPath} from '../../../config/configPath'
const core = function (param) {
  return new Promise((resolve, reject) => {

  });
};

core.path = (function(){
  let obj = {},key;
  for(key in location){
    if(typeof location[key] !== 'function'){
      obj[key] = location[key];
    }
  }
  obj.contextPath = '';
  obj.apiPath = '/api';
  obj.publicPath = obj.apiPath + '/uploadFiles';


  obj.imagePath = imagePath;
  obj.domainPath = domainPath;
  // obj.apiPath = apiPath;
  return obj;
})();

core.validate = {};
core.validate.isEmail = (val) => {
  return /^[a-zA-Z0-9_.-]+@[a-zA-Z0-9-]+(\.[a-zA-Z0-9-]+)*\.[a-zA-Z0-9]{2,6}$/.test(val);
};

export default core;
